package com.feng.controller.front;

import com.feng.dto.CategoryDto;
import com.feng.service.NewscategoryService;
import com.feng.vo.ResultVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author: 丰
 * @date: 2023/1/1 18:52
 */
@RestController
@RequestMapping("/front/news")
@Api(tags = "前台新闻分类接口")
public class FrontNewsCategoryController {

    @Autowired
    private NewscategoryService categoryService;

    @ApiOperation("查询所有")
    @GetMapping("/getAllCategory")
    public ResultVo<List<CategoryDto>> getAllCategory(){
        return categoryService.getAllCategory();
    }
}
